<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function showImage(age) {

            // 该函数只能在showImage函数内部使用
            function isOk() {
                return age >= 18;
            }

            if (isOk()) {
                console.log("你可以看")
            } else {
                
                console.log("你不能看")
            }


        }

        showImage(20);

    </script>
</body>
</html>